﻿namespace NanoMvvm.Async
{
    public sealed class ProgressToken
    {
        private readonly AsyncTaskViewModel taskViewModel;

        internal ProgressToken(AsyncTaskViewModel taskViewModel)
        {
            this.taskViewModel = taskViewModel;
        }

        public double Progress
        {
            get
            {
                return taskViewModel.Progress;
            }

            set
            {
                taskViewModel.Progress = value;
            }
        }
    }
}